import mockjs from "mockjs";
import cgi from "conf/cgi";
//主菜单信息
mockjs.mock(cgi.startPage, {
    "code": 0,
    "msg": "success",
    "data": {
        list: [
            {
                device : 'Android',
                position: '启动页',
                imageSrc: 'http://www.gettyimages.com/gi-resources/images/Embed/new/embed2.jpg',
                operated: 1,//0 不能操作  1编辑
                updateTime: '2017-05-22 12:00:00',
                updatePerson: '管理员A',
            },
            {
                device : 'iOS',
                position: '启动页',
                imageSrc: 'http://www.gettyimages.com/gi-resources/images/Embed/new/embed2.jpg',
                operated: 1,//0 不能操作  1编辑
                updateTime: '2017-05-22 12:00:00',
                updatePerson: '管理员A',
            }
        ]
    },
});

mockjs.mock(cgi.openAddress, {
    "code": 0,
    "msg": "success",
    "data": {
        "list|5-10": [
            {
                title : 'APP下载送流量',
                device : 'Android',
                "state|0-1": 1, //0禁用  1启用
                operated: 1,//0 不能操作  1编辑
                updateTime: '2017-05-22 12:00:00',
                updatePerson: '管理员A',
            }
        ]
    },
});





mockjs.mock(cgi.fullAd, {
    "code": 0,
    "msg": "success",
    "data": {
        "list|5-10": [
            {
                title : 'APP下载送流量',
                device : 'Android',
                position: '广告位',
                imageSrc: 'http://www.gettyimages.com/gi-resources/images/Embed/new/embed2.jpg',
                type: '1,2,3',
                expiryDate: '2017-05-24  09:00:00 -2017-05-24  09:00:00',
                "state|0-1": 1, //0禁用  1启用
                operated: 1,//0 不能操作  1编辑
                updateTime: '2017-05-22 12:00:00',
                updatePerson: '管理员A',
            }
        ]
    },
});
mockjs.mock(cgi.adsense, {
    "code": 0,
    "msg": "success",
    "data": {
        "list|10-20": [
            {
                title : 'APP下载送流量',
                device : 'Android',
                position: '广告位',
                imageSrc: 'http://www.gettyimages.com/gi-resources/images/Embed/new/embed2.jpg',
                type: '1,2,3',
                applyUser:'真实/模拟/游客',
                expiryDate: '2017-05-24  09:00:00 -2017-05-24  09:00:00',
                "state|0-1": 1, //0禁用  1启用
                operated: 1,//0 不能操作  1编辑
                updateTime: '2017-05-22 12:00:00',
                updatePerson: '管理员A',
            }
        ]
    },
});
mockjs.mock(cgi.revisepProposalInfo, {
    "code": 0,
    "msg": "success",
    "data": {
        "createUser": "ghg",
        "createIp": "0:0:0:0:0:0:0:1",
        "createDate": "2017-05-19 14:55:59",
        "updateUser": "ghg",
        "updateIp": "0:0:0:0:0:0:0:1",
        "updateDate": "2017-05-22 17:23:04",
        "versionNo": null,
        "enableFlag": "Y",
        "deleteFlag": "N",
        "companyId": 1,
        "id": 3,
        "activityPeriods": "002",
        "activityName": "活动2",
        "activityType": "actType_task",
        "startTime": "2017-05-01 14:55:48",
        "endTime": "2017-05-31 14:55:51",
        "finishDays": 1,
        "withGoldDays": 5,
        "coinDays": 2,
        "demoKeepAmount": 6,
        "maxExchangeCount": 3,
        "position": null,
        "activityUrl": null,
        "activityImg": null,
        "islogin": null,
        "loginjsFunctionName": null,
        "otherMsg": null,
        "special": null,
        "pno": "A170519B0002",
        "proposer": "ghg",
        "proposalDate": "2017-05-19 14:55:59",
        "proposalStatus": "待审批",
        "approver": null,
        "approveDate": null,
        "canceller": null,
        "cancelDate": null,
        "cancelReason": null,
        "activityTypeStr": "任务型",
        "modifyDetails": null
    },
});

/*功能管理 -- 功能列表接口*/
mockjs.mock(new RegExp('^'+cgi.functionList,), {
    "code": 0,
    "msg": "success",
    "data": {
        "list|2-9":[
                {
                    "id": 3,
                    "name": "新手学堂",
                    "postionText": "首页-菜单",
                    "ico": "",
                    "link": "https://www.baidu.com",
                    "status": 1,
                    "sortNumber": 0,
                    "updatePerson": "Vue",
                    "updateDate": "2017-05-22 17:23:04",
                    "functionId": 1,
            }
        ],
        "total|100-1000":100
    }
});